import org.junit.Test;
import redis.clients.jedis.Jedis;

/**
 * @author 帅小伙
 * @date 2021/12/31
 * @description
 */
public class JedisDemo {

    public static void main(String[] args) {
        // 创建jedis对象
        Jedis jedis = new Jedis("47.96.19.90",23333);

        String value = jedis.ping();
        System.out.println(value);
        
    }
    
    
    @Test()
    public void test() {
        // 创建jedis对象
        Jedis jedis = new Jedis("47.96.19.90",23333);

        jedis.keys("*").forEach(System.out::println);
    }

    @Test()
    public void test1() {
        Jedis jedis = new Jedis("47.96.19.90",23333);

        String age = jedis.hget("user:101", "name");
        System.out.println(age);
    }
}
